package com.admin.validator;

import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils;
import org.springframework.validation.Validator;

import com.admin.domain.ItemCommand;
import com.member.domain.MemberCommand;

public class ItemValidator implements Validator{

	@Override
	public boolean supports(Class<?> clazz) {
		return ItemCommand.class.isAssignableFrom(clazz);
	}

	@Override
	public void validate(Object target, Errors errors) {
		
		ValidationUtils.rejectIfEmptyOrWhitespace(errors, "i_name", "required");
	}

}
  